Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: start_time to be defined before clean() and setup() #6115

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

janekmi
Copy link
Contributor

@janekmi janekmi commented Sep 30, 2024

Just in case any of these fails it has to be defined.


This change is Reviewable

@janekmi janekmi added the no changelog Add to skip the changelog check on your pull request label Sep 30, 2024
@janekmi janekmi added the sprint goal This pull request is part of the ongoing sprint label Oct 1, 2024
Copy link
Contributor

@osalyk osalyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @grom72)

Copy link
Contributor

@grom72 grom72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @janekmi)

Copy link
Contributor

@osalyk osalyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @janekmi)


src/test/unittest/basetest.py line 171 at r1 (raw file):

        """
        self.ctx = c
        start_time = None

Why?

Copy link
Contributor Author

@janekmi janekmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @osalyk)


src/test/unittest/basetest.py line 171 at r1 (raw file):

Previously, osalyk (Oksana Sałyk) wrote…

Why?

Otherwise, if any of the clean() or setup() steps fail before the start_time is assigned for the first time you will end up with an error followed by an error.

futils.Fail: xxx

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./RUNTESTS.py", line 220, in <module>
    main()
  File "./RUNTESTS.py", line 216, in main
    sys.exit(runner.run_tests())
  File "./RUNTESTS.py", line 119, in run_tests
    t._execute(c)
  File "/home/jmichal/work/pmdk/src/test/unittest/basetest.py", line 190, in _execute
    if start_time is not None:
UnboundLocalError: local variable 'start_time' referenced before assignment

Copy link
Contributor

@osalyk osalyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @janekmi)


src/test/unittest/basetest.py line 171 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…

Otherwise, if any of the clean() or setup() steps fail before the start_time is assigned for the first time you will end up with an error followed by an error.

futils.Fail: xxx

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./RUNTESTS.py", line 220, in <module>
    main()
  File "./RUNTESTS.py", line 216, in main
    sys.exit(runner.run_tests())
  File "./RUNTESTS.py", line 119, in run_tests
    t._execute(c)
  File "/home/jmichal/work/pmdk/src/test/unittest/basetest.py", line 190, in _execute
    if start_time is not None:
UnboundLocalError: local variable 'start_time' referenced before assignment

Maybe leave a trace of it as a comment in the code.

Copy link
Contributor Author

@janekmi janekmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @osalyk)


src/test/unittest/basetest.py line 171 at r1 (raw file):

Previously, osalyk (Oksana Sałyk) wrote…

Maybe leave a trace of it as a comment in the code.

Done.

Copy link
Contributor

@osalyk osalyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @janekmi)

@janekmi janekmi merged commit 193a8a3 into pmem:master Oct 3, 2024
6 of 7 checks passed
grom72 added a commit to grom72/pmdk that referenced this pull request Oct 3, 2024
janekmi added a commit that referenced this pull request Oct 3, 2024
common: fix cstyle introduced by PR #6115
Just in case any of these fails it has to be defined.

Signed-off-by: Jan Michalski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Add to skip the changelog check on your pull request sprint goal This pull request is part of the ongoing sprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants